package Entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

import VOs.UsuarioVO;

@Entity
public class Usuario {
	@Id
	private int id;
	@Column(name = "\"LOGIN\"")
	private String login;
	@Column(name = "\"PASSWORD\"")
	private String password;
	private Rol rol;
	
	public UsuarioVO tovo(){
		UsuarioVO vo = new UsuarioVO();
		vo.setId(getId());
		vo.setLogin(getLogin());
		vo.setPassword(getPassword());
		vo.setRol(getRol());
		
		return vo;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Rol getRol() {
		return rol;
	}

	public void setRol(Rol rol) {
		this.rol = rol;
	}

}
